home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / formdr1a / formdrag.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-10-07  |  1.7 KB  |  51 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   0  'None
  4.    Caption         =   "Form Drag Example"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   4680
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3195
  11.    ScaleWidth      =   4680
  12.    ShowInTaskbar   =   0   'False
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin VB.CommandButton Command1 
  15.       Caption         =   "Drag with this too!"
  16.       Height          =   855
  17.       Left            =   960
  18.       TabIndex        =   2
  19.       Top             =   960
  20.       Width           =   2655
  21.    End
  22.    Begin VB.Label Label2 
  23.       Caption         =   "X"
  24.       Height          =   495
  25.       Left            =   4320
  26.       TabIndex        =   1
  27.       Top             =   120
  28.       Width           =   375
  29.    End
  30.    Begin VB.Label Label1 
  31.       Caption         =   "by kr0q - worldfamouskr0q@phreaker.net"
  32.       Height          =   495
  33.       Left            =   120
  34.       TabIndex        =   0
  35.       Top             =   2880
  36.       Width           =   3615
  37.    End
  38. Attribute VB_Name = "Form1"
  39. Attribute VB_GlobalNameSpace = False
  40. Attribute VB_Creatable = False
  41. Attribute VB_PredeclaredId = True
  42. Attribute VB_Exposed = False
  43. Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  44. Form_Move Me
  45. 'you can also enter this code into the mousedown of an object, so you can drag with the object... as shown above
  46. End Sub
  47. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  48. Form_Move Me
  49. ' ME tells VB that you want the event to happen on the form this code is placed on
  50. End Sub
  51.